-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request #69654: Add E_DEBUG and E_USER_DEBUG constants #1290
Conversation
|
||
#define E_EXCEPTION (1<<15L) | ||
#define E_EXCEPTION (1<<17L) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know people should haven't written code that is hard-coded against the value of E_EXCEPTION, but some people will have. Adding the two new values at the end of the list would break less stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, useful information. i'll research it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Danack this is irrelevant … E_EXCEPTION is PHP 7 only and never exported as constant to userland.
Not a fan of this, I don't think this belongs into core. |
@bzick Sounds pretty good. 👍 |
@nikic, i'm not a fan of that, too. However, there are several reasons why we should add these constants:
(level descriptions taken from monolog) |
Since no RFC materialized, I'm closing the PR. |
Pull request for request #69654.
All loggers and project has [DEBUG] mode. Using E_NOTICE as debug identification is incorrect for dev-messages because in production dev-message must be ignoring and in dev-mode all messages (notices and debugs) mixed in mess.
Some extensions can use the constant E_DEBUG in their dev-messages. For example, MongoLog use E_NOTICE for debugging. It is not convenient. Zend Engine in dev-mode can use E_DEBUG and generate dev-message (we can get stack trace of memory leak messages).
For example
generates debug message